<?php
class Pageley_Commerce_Domain_OrderStatusAfterDispatch extends Pageley_Commerce_Domain_OrderStatus {
	public function tryCancel() {
		throw new Pageley_Domain_Exception(
			new Pageley_I18n_Message("error.commerce.cancelAfterDispatch"));
	}
}

Pageley_Commerce_Domain_OrderStatus::$DISPATCHED = new Pageley_Commerce_Domain_OrderStatusAfterDispatch("DISPATCHED");
Pageley_Commerce_Domain_OrderStatus::$READY_TO_DELIVER = new Pageley_Commerce_Domain_OrderStatusAfterDispatch("READY_TO_DELIVER");
Pageley_Commerce_Domain_OrderStatus::$DELIVERED = new Pageley_Commerce_Domain_OrderStatusAfterDispatch("DELIVERED");
Pageley_Commerce_Domain_OrderStatus::$CLOSED = new Pageley_Commerce_Domain_OrderStatusAfterDispatch("CLOSED");